//
//  WBComposeTypeButton.swift
//  XLWB
//
//  Created by MacBook on 16/7/9.
//  Copyright © 2016年 MacBook. All rights reserved.
//

import UIKit

class WBComposeTypeButton: UIControl {

    @IBOutlet weak var imageView: UIImageView!
   
    
    @IBOutlet weak var titleLabel: UILabel!
 
    //点击按钮要展现控制的类型
    var clsName: String?

  
    //使用图像名称/标题创建啊按钮,按钮布局从xib加载
    class func composeTypeButton(imageName: String, title: String) -> WBComposeTypeButton {
    
        let nib = UINib(nibName: "WBComposeTypeButton", bundle: nil)
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! WBComposeTypeButton
        btn.imageView.image = UIImage(named: imageName)
        btn.titleLabel.text = title
        
        return btn
    
    
    }
    
}
